<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" session="true" %>
<%
	response.setHeader("Cache-Control","no-cache");
	response.setHeader("Pragma","no-cache");
	response.setDateHeader ("Expires", -1);
	
	if (session.isNew() || session.getAttribute("currentUser") == null) {
		response.sendRedirect("index.jsp");
	}
%>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Team</title>
	<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
	<script src="http://code.jquery.com/ui/1.10.3/jquery-ui.js"></script>
	
	<script src="javascript/Common.js"></script>
	<script src="javascript/jquery.numeric.js"></script>
	<script>
		var sessionRoleName = "${sessionScope.currentUser.getRoleName()}";
		var sessionProjectId = "${sessionScope.currentUser.getProjectId()}";
		var sessionUserId = "${sessionScope.currentUser.getId()}";
		var sessionUserName = "${sessionScope.currentUser.getName()}";
	</script>
	<script src="javascript/TeamMember.js"></script>

	<link rel="stylesheet" href="http://code.jquery.com/ui/1.10.3/themes/smoothness/jquery-ui.css" />
	<link rel="stylesheet" href="stylesheets/stylesheet.css">
	<link rel="stylesheet" href="stylesheets/team.css">
</head>
<body>
	<div id="header">
		<%@ include file="/WEB-INF/jspf/HeaderBar.jspf" %>
	</div>
	<ul id="tabmenu">
		<li><a href="./Projects.jsp">Projects</a></li>
		<li><a class="active" href="./Team.jsp">Team</a></li>
		<li><a href="./Backlog.jsp">Backlog</a></li>
		<li><a href="./Sprints.jsp">Sprints</a></li>
		<li><a href="./Taskboard.jsp">Taskboard</a></li>
	</ul>

	<div id="content">
		<button id="add-team-member">Add team member</button>
		<select id="display-type">
			<option value="1">View Current Project</option>
			<option value="2">View System</option>
		</select>
		
		<div id="team-member-container" class="ui-widget">
			<table id="team-members" class="ui-widget ui-widget-content">
				<thead>
					<tr class="ui-widget-header ">
						<th class="action-column">Action</th>
						<th class="id-column">Id</th>
						<th class="name-column">Name</th>
						<th class="role-column">Role</th>
						<th class="email-column">Email</th>
						<th class="project-column">Project</th>
					</tr>
				</thead>
				<tbody></tbody>
			</table>
		</div>
	</div>
	
	<%@ include file="/WEB-INF/jspf/TeamDialog.jspf" %>
</body>
</html>